Skip to content

.4062073974432528:1bc6ad479913580c063b4167b20affd8_69e84e7d1ffbb16c7ee08c91.69e856871ffbb16c7ee08d36.69e856877d209b4c504d028b:Trae CN.T(2026/4/22 13:03:03)#36326

Open
CGW516 wants to merge 2 commits intofacebook:mainfrom
CGW516:trae_2

Conversation

@CGW516
Copy link
Copy Markdown

@CGW516 CGW516 commented Apr 22, 2026

fix(useOptimistic): 修复乐观更新在异步操作中的隔离问题

确保乐观更新的回滚机制仅与触发它的特定操作相关联,而不是被全局异步操作阻塞。添加回归测试验证组件B的乐观UI在自身操作完成时回滚,而不受组件A慢速操作的影响。

CGW406 added 2 commits April 22, 2026 12:50
移除对全局异步操作状态的检查,确保乐观更新的还原仅与触发它的特定操作相关。这样即使其他组件有较慢的重叠异步操作,当前组件的乐观UI也能正确还原。
确保乐观更新的回滚机制仅与触发它的特定操作相关联,而不是被全局异步操作阻塞。添加回归测试验证组件B的乐观UI在自身操作完成时回滚,而不受组件A慢速操作的影响。
@meta-cla
Copy link
Copy Markdown

meta-cla Bot commented Apr 22, 2026

Hi @CGW516!

Thank you for your pull request and welcome to our community.

Action Required

In order to merge any pull request (code, docs, etc.), we require contributors to sign our Contributor License Agreement, and we don't seem to have one on file for you.

Process

In order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA.

Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with CLA signed. The tagging process may take up to 1 hour after signing. Please give it that time before contacting us about it.

If you have received this in error or have any questions, please contact us at cla@meta.com. Thanks!

@react-sizebot
Copy link
Copy Markdown

Comparing: 94643c3...684ee57

Critical size changes

Includes critical production bundles, as well as any change greater than 2%:

Name +/- Base Current +/- gzip Base gzip Current gzip
oss-stable/react-dom/cjs/react-dom.production.js = 6.84 kB 6.84 kB = 1.88 kB 1.88 kB
oss-stable/react-dom/cjs/react-dom-client.production.js = 612.96 kB 612.85 kB = 108.32 kB 108.31 kB
oss-experimental/react-dom/cjs/react-dom.production.js = 6.84 kB 6.84 kB = 1.88 kB 1.88 kB
oss-experimental/react-dom/cjs/react-dom-client.production.js = 678.89 kB 678.78 kB = 119.28 kB 119.27 kB
facebook-www/ReactDOM-prod.classic.js = 698.63 kB 698.52 kB = 122.75 kB 122.74 kB
facebook-www/ReactDOM-prod.modern.js = 688.94 kB 688.84 kB = 121.14 kB 121.13 kB

Significant size changes

Includes any change greater than 0.2%:

(No significant changes)

Generated by 🚫 dangerJS against 684ee57

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants